Optimal. Leaf size=120 \[ -\frac {(1-i) \sqrt {a} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 \sqrt {a+i a \tan (c+d x)}}{3 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {2 i \sqrt {a+i a \tan (c+d x)}}{3 d \sqrt {\tan (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3642, 3679, 12,
3625, 211} \begin {gather*} -\frac {2 \sqrt {a+i a \tan (c+d x)}}{3 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {2 i \sqrt {a+i a \tan (c+d x)}}{3 d \sqrt {\tan (c+d x)}}-\frac {(1-i) \sqrt {a} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 3625
Rule 3642
Rule 3679
Rubi steps
\begin {align*} \int \frac {\sqrt {a+i a \tan (c+d x)}}{\tan ^{\frac {5}{2}}(c+d x)} \, dx &=-\frac {2 \sqrt {a+i a \tan (c+d x)}}{3 d \tan ^{\frac {3}{2}}(c+d x)}+\frac {2 \int \frac {\left (\frac {i a}{2}-a \tan (c+d x)\right ) \sqrt {a+i a \tan (c+d x)}}{\tan ^{\frac {3}{2}}(c+d x)} \, dx}{3 a}\\ &=-\frac {2 \sqrt {a+i a \tan (c+d x)}}{3 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {2 i \sqrt {a+i a \tan (c+d x)}}{3 d \sqrt {\tan (c+d x)}}+\frac {4 \int -\frac {3 a^2 \sqrt {a+i a \tan (c+d x)}}{4 \sqrt {\tan (c+d x)}} \, dx}{3 a^2}\\ &=-\frac {2 \sqrt {a+i a \tan (c+d x)}}{3 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {2 i \sqrt {a+i a \tan (c+d x)}}{3 d \sqrt {\tan (c+d x)}}-\int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {2 \sqrt {a+i a \tan (c+d x)}}{3 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {2 i \sqrt {a+i a \tan (c+d x)}}{3 d \sqrt {\tan (c+d x)}}+\frac {\left (2 i a^2\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=-\frac {(1-i) \sqrt {a} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 \sqrt {a+i a \tan (c+d x)}}{3 d \tan ^{\frac {3}{2}}(c+d x)}-\frac {2 i \sqrt {a+i a \tan (c+d x)}}{3 d \sqrt {\tan (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F]
time = 2.70, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a+i a \tan (c+d x)}}{\tan ^{\frac {5}{2}}(c+d x)} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 196 vs. \(2 (96 ) = 192\).
time = 0.19, size = 197, normalized size = 1.64
method | result | size |
derivativedivides | \(\frac {\left (3 i \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )-4 i \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \tan \left (d x +c \right )-4 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {-i a}\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}}{6 d \tan \left (d x +c \right )^{\frac {3}{2}} \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {-i a}}\) | \(197\) |
default | \(\frac {\left (3 i \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )-4 i \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \tan \left (d x +c \right )-4 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {-i a}\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}}{6 d \tan \left (d x +c \right )^{\frac {3}{2}} \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {-i a}}\) | \(197\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 974 vs. \(2 (88) = 176\).
time = 0.67, size = 974, normalized size = 8.12 \begin {gather*} \frac {2 \, \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} {\left ({\left (\left (3 i + 3\right ) \, \cos \left (3 \, d x + 3 \, c\right ) + \left (i + 1\right ) \, \cos \left (d x + c\right ) + \left (3 i - 3\right ) \, \sin \left (3 \, d x + 3 \, c\right ) + \left (i - 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (\frac {3}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + {\left (\left (3 i - 3\right ) \, \cos \left (3 \, d x + 3 \, c\right ) + \left (i - 1\right ) \, \cos \left (d x + c\right ) - \left (3 i + 3\right ) \, \sin \left (3 \, d x + 3 \, c\right ) - \left (i + 1\right ) \, \sin \left (d x + c\right )\right )} \sin \left (\frac {3}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )\right )} \sqrt {a} + 3 \, {\left (2 \, {\left (-\left (i + 1\right ) \, \cos \left (2 \, d x + 2 \, c\right )^{2} - \left (i + 1\right ) \, \sin \left (2 \, d x + 2 \, c\right )^{2} + \left (2 i + 2\right ) \, \cos \left (2 \, d x + 2 \, c\right ) - i - 1\right )} \arctan \left ({\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) - \cos \left (d x + c\right ), {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) - \sin \left (d x + c\right )\right ) + {\left (-\left (i - 1\right ) \, \cos \left (2 \, d x + 2 \, c\right )^{2} - \left (i - 1\right ) \, \sin \left (2 \, d x + 2 \, c\right )^{2} + \left (2 i - 2\right ) \, \cos \left (2 \, d x + 2 \, c\right ) - i + 1\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + \sqrt {\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1} {\left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2} + \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )^{2}\right )} - 2 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} {\left (\cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) \sin \left (d x + c\right ) + \cos \left (d x + c\right ) \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )\right )}\right )\right )} {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sqrt {a} + 2 \, {\left ({\left ({\left (-\left (i + 1\right ) \, \cos \left (d x + c\right ) - \left (i - 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right )^{2} + {\left (-\left (i + 1\right ) \, \cos \left (d x + c\right ) - \left (i - 1\right ) \, \sin \left (d x + c\right )\right )} \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, {\left (\left (i + 1\right ) \, \cos \left (d x + c\right ) + \left (i - 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right ) - \left (i + 1\right ) \, \cos \left (d x + c\right ) - \left (i - 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + {\left ({\left (-\left (i - 1\right ) \, \cos \left (d x + c\right ) + \left (i + 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right )^{2} + {\left (-\left (i - 1\right ) \, \cos \left (d x + c\right ) + \left (i + 1\right ) \, \sin \left (d x + c\right )\right )} \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, {\left (\left (i - 1\right ) \, \cos \left (d x + c\right ) - \left (i + 1\right ) \, \sin \left (d x + c\right )\right )} \cos \left (2 \, d x + 2 \, c\right ) - \left (i - 1\right ) \, \cos \left (d x + c\right ) + \left (i + 1\right ) \, \sin \left (d x + c\right )\right )} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), -\cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )\right )} \sqrt {a}}{6 \, {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} - 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {5}{4}} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 355 vs. \(2 (88) = 176\).
time = 0.37, size = 355, normalized size = 2.96 \begin {gather*} \frac {8 \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (e^{\left (5 i \, d x + 5 i \, c\right )} + e^{\left (3 i \, d x + 3 i \, c\right )}\right )} - 3 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {2 i \, a}{d^{2}}} \log \left ({\left (\sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} + d \sqrt {-\frac {2 i \, a}{d^{2}}} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) + 3 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {2 i \, a}{d^{2}}} \log \left ({\left (\sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} - d \sqrt {-\frac {2 i \, a}{d^{2}}} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right )}{6 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}{\tan ^{\frac {5}{2}}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{{\mathrm {tan}\left (c+d\,x\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________